﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Happy.Primitive;

namespace Happy.Domain
{
    /// <summary>
    /// 领域驱动里的值对象基类。
    /// </summary>
    public abstract class ValueObject<TValueObject> : ValueTypeBase<TValueObject>
        where TValueObject : ValueObject<TValueObject>
    {
        /// <summary>
        /// 克隆一个版本。
        /// </summary>
        public virtual TValueObject Clone()
        {
            return this.MemberwiseClone() as TValueObject;
        }
    }
}
